(function ($) {
    $(document).ready(function () {
        function retailstore_load (id,year,sales,tableName) {
            var html ='<div class="fertilization-div '+id+'"><div class="fertilization-title">' +year+
                '销售量<span class="fertilization-delete" onclick="delete_retailstore(\''+tableName+'\',\''+id+'\')">-</span></div>' +
                '<ul><li>年份:'+year+'</li>' +
                '<li>销量:'+sales+'</li></ul></div>';
            jQuery('.add-fertilization-div').before(html);
        }
        $(".fertilizer-sub").each(function(){
            retailstore_load($(this).attr("f_id"),
                $(this).attr("f_year"),
                $(this).attr("f_sales"),
                $(this).attr("f_tablename"));
        });
    })
})(jQuery);